home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
033a
/
slpack2.zip
/
SLPACK.DOC
next >
Wrap
Text File
|
1991-11-02
|
12KB
|
312 lines
SLPACK
Searchlight Message Base Pack/Optimize Utility
Version 2.15, November, 1991
(c) Copyright 1991 Searchlight Software
INTRODUCTION
------------
SLPACK is a message base packing and optimization utility for Searchlight
2.15 message subboards. SLPACK operates on subboard header (HDR) and/or
message (MSG) files, and performs three main tasks:
(1) Optimization -- Records in the data files are physically sorted into
sequential order, improving access times.
(2) Packing -- Unused records are purged from the data files and the files
are physically shrunk to release unused disk space back to DOS.
(3) Renumbering -- Messages can optionally be renumbered in sequential order
starting with 1, when packing the subboard header files.
SLPACK is a command-line driven program; it can operate on one, several, or
all subboards at once. Command line options are shown below.
SYNTAX
------
The command line syntax for running SLPACK is as follows:
SLPACK [Options...] [Subboards...]
"Options" can be one or more of the option switches described below, and
"Subboards" can be one or more valid subboard names. Subboard names are
required unless the /A (All) switch is used. If no options or subboard names
are specified, then SLPACK displays a brief summary of its options:
/M Pack message (MSG) files only
/H Pack header (HDR) files only
/R Renumber messages on subboard
/N Skip confirmation prompt
/A Pack all subboards
/S Scan subboards before packing
/Fn[,m] Free records for header [,message] files
/Pn Pack only if 1st message >= n
Note: Before running SLPACK, please see the CAUTION section below.
OPTIONS
-------
Option /M -- Pack Message Files Only
If the /M switch is given, SLPACK will pack only the message (*.MSG) files
associated with the given subboards. Otherwise, both the header and message
files are packed.
The message file is usually larger than the header file; therefore, packing
the message file only provides a good deal of optimization in a shorter
amount of time than if both files are packed. However, packing the header
file is required if you want to renumber messages.
Example: SLPACK /M GENERAL SLBBS-R
Option /H -- Pack Header Files Only
This option causes just the header files of the specified subboards to be
packed and optimized. Message files are not affected.
Example: SLPACK /H GENERAL SLBBS-R
Option /R -- Renumber Messages
The renumber option causes messages to be renumbered sequentially, with the
first message number equal to 1 and the last number equal to the number of
messages on the subboard.
Renumbering can only occur if the header file is packed; no renumbering will
take place if the /M option is also selected.
The renumber option also causes the high message pointers contained in the
subboard's member files to be updated.
Example: SLPACK /R GENERAL SLBBS-R
Option /N -- Skip Confirmation Prompt
When /N is NOT specified, SLPACK displays a warning message before it begins
to run, and requires that you type "Y" and "Enter" to continue. If the /N
switch is specified, this confirmation prompt is skipped.
Use /N when you run SLPACK in an unattended environment (such as in a batch
file or as part of an event).
Example: SLPACK /R /N SLBBS-R
Option /A -- Pack All Subboards
The /A switch causes SLPACK to operate on all subboards in your system,
instead of just the subboards specified on the command line. When /A is
used, no subboard names need be specified.
Example: SLPACK /R /N /A
Option /S -- Scan Subboards Before Packing
When the /S switch is enabled, SLPACK does a repair scan (equivalent to the
F3 utility functions in the SETUP program) before packing each file.
This option is recommended, especially when running SLPACK in an unattended
mode (such as when SLPACK is part of an event). Packing a subboard involves
rearranging every record in the file; files which contain even one bad
pointer or corrupt record can result in the entire subboard becoming corrupt
and even in SLPACK aborting. Using the /S switch assures that each subboard
file is checked for consistency before it is packed.
If you are reasonably sure that a subboard is not corrupted, you can omit
the /S switch, which will speed up SLPACK.
Note that the /S switch is not a substitute for making a backup; it is
always recommended that a backup of the files to be packed be made before
running SLPACK.
Option /Fn[,m] -- Specify Free Record Counts
The /F command, which is followed by one or two numeric parameters,
specifies the number of free records to be appended to the end of the header
and message files after packing is complete.
By default, SLPACK removes all free records from these files when it packs
them; if /F is specified, then SLPACK appends the requested number of free
records to the end of the files. Preallocated free records help reduce file
fragmentation and increase speed when saving new messages to the file.
Note that free record parameters have no effect unless the respective file
is actually packed.
Example: SLPACK /F30,100 SLBBS-R (30 free header & 100 free message recs)
SLPACK /F40 /H SLBBS-R (40 free header records)
SLPACK /F0,200 /M SLBBS-R (200 free message records)
Option /Pn -- Check 1st Message Before Packing
If the /P option is used, followed by a numeric parameter, then SLPACK only
packs subboards where the first message on the subboard is greater than or
equal to the parameter given. For example, if /P100 is specified on the
command line, then only subboards where the first message on the sub is
equal to or greater than 100 are packed.
Used in conjunction with the /R option, /P allows you to monitor subboards
which have high turnover volumes and renumber these subs only when the
oldest message number reaches a certain level. For example, suppose you have
a subboard which can contain a maximum of 1000 messages, has auto-purge
enabled, and you prefer that the highest message number does not exceed
1500. To accomplish this automatically, you could execute the following
command on a regular basis:
SLPACK /R /P500 SLBBS-R
The value of "500" is chosen for the /P parameter because 500 plus the
subboard maximum messages (1000) equals the message number preference of
1500. It should be noted that if messages are deleted from the subboard
(other than the earliest messages) or if purge protection is enabled for any
message, then the high message number may exceed 1500 before the lowest
message number exceeds 500 and the renumber operation takes place.
MESSAGES
--------
SLPACK will display the following progress messages as it runs:
Packing Subboard: NAME
Packing/Renumbering Subboard: NAME
The "Packing" or "Packing/Renumbering" message tells you which subboard is
currently being packed or renumbered.
Performing Safety Scan...
If the /S switch is used, this message appears while SLPACK is performing
the initial repair scan of the file before packing it.
Header File: Reading, Sorting, Done.
Rebuilding Indexes:
Rebuilding Threads:
Rebuilding Free List:
These messages follow the progress of the header file repacking, if that
option has been selected.
Expanding to nnn Free Records...
If the /F option is used, this message appears to report that the file
is being expanded.
Updating Member Records...
This message appears during a renumber (/R) function while the member
file is being updated.
Msg File: Reading, Sorting, Done.
Rebuilding Free List:
Expanding to nnn Free Records...
These messages follow the progress of the message file packing process.
The "Expanding" message appears only if a free record count for the
message file has been specified with /F.
Skipped (1st message number = nnn)
This message indicates that a particular subboard is not being packed,
because the /P parameter has been used and the first message on the
subboard is less than the target value.
Insufficient Memory Available (nnn bytes needed)
Not enough memory is available to pack this subboard. See memory
requirements, below.
Cannot Open Subboard:
Indicates that the subboard cannot be opened. Check the subboard name and
its data files path.
CAUTIONS
--------
SLPACK rewrites and rearranges the entire message and header files of the
subboards it packs. Because of the way in which it operates, SLPACK is
extremely sensitive to power failures, corrupt files, bad disk sectors, and
other such problems which may occur during its operation. In order to
prevent data loss, we stronly urge you to follow these precautions:
(1) BACK-UP ALL SUBBOARD FILES BEFORE PACKING THEM. If an error occurs
during SLPACK's operation, it should be assumed that the subboard which
was open at the time of the error is corrupted, and needs to be restored
from the backup copy.
(2) Do not disturb SLPACK once it begins to run. Any attempt to abort
SLPACK will result in a corrupted subboard. The same is true if SLPACK
should be interrupted by a system failure such as a reboot, power
failure, bad disk sector, etc.
(3) In multinode systems, no other nodes should be active while SLPACK is
running. Either shut your other nodes down manually or, if SLPACK runs
as an event, make sure the other nodes are idle while it runs.
(4) SLPACK will fail if it tries to pack a subboard which contains corrupted
data files and the /S command line switch is not specified. Should
this occur, try to repair the subboard via the SETUP program repair
functions. If this fails, then restore the subboard from a backup file,
and pack it again, specifying the /S switch on the SLPACK command line.
EXIT CODES
----------
SLPACK will return one of three exit codes (errorlevels) when it completes:
Errorlevel 0 -- Indicates that no errors occured and all requested
operations were carried out successfully.
Errorlevel 1 -- Indicates that SLPACK has done nothing, for one of the
following reasons:
A. No command line parameters were specified.
B. SLPACK could not open the CONFIG.SL2 file. Be sure that CONFIG.SL2
is either in the current directory, or pointed to by SET SLBBS=.
C. You answered "N" to the confirmation prompt.
Errorlevel 2 -- Indicates that one or more operations failed, because of
the following reasons:
A. Can't open subboard: a subboard name given on the command line was
incorrect, or the subboard files could not be located and opened.
B. Not enough RAM for requested operation. See RAM note below.
Note that Errorlevel 2 errors do not cause SLPACK to terminate immediately.
It will continue to run and process as many subboards as possible.
RAM REQUIREMENTS
----------------
SLPACK requires a significant amount of memory to pack large message bases.
If insufficient memory is available to pack a particular subboard, SLPACK
will skip that subboard and display an error message. It will also exit with
an error level of 2.
Here is how you can compute the memory required to pack a particular
subboard:
(1) Take the DOS file size of the header (*.HDR) file, subtract 8332,
and divide by 256. If you are using the renumber (/R) option, multiply
this result by 6. Otherwise, multiply it by 2.
(2) Take the DOS file size of the message (*.MSG) file, subtract 140,
and divide by 128.
(3) Take THE LARGER OF the two numbers above and add 67,000. This is the
approximate amount of free DOS memory that needs to be available
before you can run SLPACK on this subboard.
------